package com.wwg.wechatrecord.utils;

import android.os.Environment;

import com.blankj.utilcode.util.AppUtils;

import java.io.File;

public class FilePath {

    private static final String SD_PATH = Environment.getExternalStorageDirectory().getPath();
    private static final String DATA_PATH = Environment.getDataDirectory().getPath();
    private static final String SD_STATE = Environment.getExternalStorageState();
    public static final String NAME = AppUtils.getAppName();

    //应用文件夹
    private static final String BaseFilePath = getAppPath();

    //音频录制文件夹
    public static final String AudioRecord = BaseFilePath+"/AudioRecord/";



    public static String getAppPath() {
        StringBuilder path = new StringBuilder();
        if (SD_STATE.equals(
                android.os.Environment.MEDIA_MOUNTED)) {
            path.append(SD_PATH);
        } else {
            path.append(DATA_PATH);
        }
        path.append(File.separator);
        path.append(NAME);
        path.append(File.separator);
        return path.toString();
    }

}
